'use strict'

var fs = require('fs')
var Promise = require('bluebird')

exports.readFileSync = function(fpath,encoding) {
	return new Promise(function(resolve,reject) {
		fs.readFile(fpath,encoding, function(err, content){
			if (err) reject(err)
			else resolve(content)
		})
	})
}

exports.writeFileSync = function(fpath,content) {
	return new Promise(function(resolve,reject) {
		fs.writeFile(fpath,content, function(err){
			if (err) reject(err)
			else resolve()
		})
	})
}